package com.stox.core.lifecycle;

import com.stox.core.manager.LifeCycleManager;
import com.stox.ioc.Container;

public class ShutdownHook extends Thread {

	private LifeCycleManager lifeCycleManager;
	
	public ShutdownHook() {
		this.lifeCycleManager = Container.get(LifeCycleManager.class);
	}
	
	@Override
	public void run() {
		lifeCycleManager.shutdown();
	}


	public LifeCycleManager getLifeCycleManager() {
		return lifeCycleManager;
	}


	public void setLifeCycleManager(LifeCycleManager lifeCycleManager) {
		this.lifeCycleManager = lifeCycleManager;
	}
	
}
